home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / jar / nsIJAR.h next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  149 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIJAR.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIJAR_h__
  6. #define __gen_nsIJAR_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. #define NS_JAR_CID                    \
  18. { /* 04501DB3-0409-11d3-BCF8-00805F0E1353*/  \
  19.     0x04501DB3,                              \
  20.     0x0409,                                  \
  21.     0x11d3,                                  \
  22.     {0xbc, 0xf8, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53} \
  23. }
  24. #define NS_JAR_CONTRACTID \
  25.   "@mozilla.org/libjar;1"
  26. #define NS_IJARFactory_IID                    \
  27. { /* 04501DB4-0409-11d3-BCF8-00805F0E1353 */         \
  28.     0x04501DB4,                                      \
  29.     0x0409,                                          \
  30.     0x11d3,                                          \
  31.     {0xbc, 0xf8, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53} \
  32. }
  33. #define NS_JARFactory_CID                 \
  34. { /* 04501DB5-0409-11d3-BCF8-00805F0E1353 */         \
  35.     0x04501DB5,                                      \
  36.     0x0409,                                          \
  37.     0x11d3,                                          \
  38.     {0xbc, 0xf8, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53} \
  39. }
  40. class nsIPrincipal; /* forward declaration */
  41.  
  42.  
  43. /* starting interface:    nsIJAR */
  44. #define NS_IJAR_IID_STR "04501db2-0409-11d3-bcf8-00805f0e1353"
  45.  
  46. #define NS_IJAR_IID \
  47.   {0x04501db2, 0x0409, 0x11d3, \
  48.     { 0xbc, 0xf8, 0x00, 0x80, 0x5f, 0x0e, 0x13, 0x53 }}
  49.  
  50. class NS_NO_VTABLE nsIJAR : public nsISupports {
  51.  public: 
  52.  
  53.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJAR_IID)
  54.  
  55.   enum { NOT_SIGNED = 0 };
  56.  
  57.   enum { VALID = 1 };
  58.  
  59.   enum { INVALID_SIG = 2 };
  60.  
  61.   enum { INVALID_UNKNOWN_CA = 3 };
  62.  
  63.   enum { INVALID_MANIFEST = 4 };
  64.  
  65.   enum { INVALID_ENTRY = 5 };
  66.  
  67.   enum { NO_MANIFEST = 6 };
  68.  
  69.   /**
  70.      * Returns an object describing the entity which signed 
  71.      * an entry. parseManifest must be called first. If aEntryName is an
  72.      * entry in the jar, getInputStream must be called after parseManifest.
  73.      * If aEntryName is an external file which has meta-information 
  74.      * stored in the jar, verifyExternalFile (not yet implemented) must 
  75.      * be called before getPrincipal.
  76.      */
  77.   /* void getCertificatePrincipal (in string aEntryName, out nsIPrincipal aPrincipal); */
  78.   NS_IMETHOD GetCertificatePrincipal(const char *aEntryName, nsIPrincipal **aPrincipal) = 0;
  79.  
  80.   /* readonly attribute PRUint32 manifestEntriesCount; */
  81.   NS_IMETHOD GetManifestEntriesCount(PRUint32 *aManifestEntriesCount) = 0;
  82.  
  83. };
  84.  
  85. /* Use this macro when declaring classes that implement this interface. */
  86. #define NS_DECL_NSIJAR \
  87.   NS_IMETHOD GetCertificatePrincipal(const char *aEntryName, nsIPrincipal **aPrincipal); \
  88.   NS_IMETHOD GetManifestEntriesCount(PRUint32 *aManifestEntriesCount); 
  89.  
  90. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  91. #define NS_FORWARD_NSIJAR(_to) \
  92.   NS_IMETHOD GetCertificatePrincipal(const char *aEntryName, nsIPrincipal **aPrincipal) { return _to GetCertificatePrincipal(aEntryName, aPrincipal); } \
  93.   NS_IMETHOD GetManifestEntriesCount(PRUint32 *aManifestEntriesCount) { return _to GetManifestEntriesCount(aManifestEntriesCount); } 
  94.  
  95. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  96. #define NS_FORWARD_SAFE_NSIJAR(_to) \
  97.   NS_IMETHOD GetCertificatePrincipal(const char *aEntryName, nsIPrincipal **aPrincipal) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertificatePrincipal(aEntryName, aPrincipal); } \
  98.   NS_IMETHOD GetManifestEntriesCount(PRUint32 *aManifestEntriesCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetManifestEntriesCount(aManifestEntriesCount); } 
  99.  
  100. #if 0
  101. /* Use the code below as a template for the implementation class for this interface. */
  102.  
  103. /* Header file */
  104. class nsJAR : public nsIJAR
  105. {
  106. public:
  107.   NS_DECL_ISUPPORTS
  108.   NS_DECL_NSIJAR
  109.  
  110.   nsJAR();
  111.  
  112. private:
  113.   ~nsJAR();
  114.  
  115. protected:
  116.   /* additional members */
  117. };
  118.  
  119. /* Implementation file */
  120. NS_IMPL_ISUPPORTS1(nsJAR, nsIJAR)
  121.  
  122. nsJAR::nsJAR()
  123. {
  124.   /* member initializers and constructor code */
  125. }
  126.  
  127. nsJAR::~nsJAR()
  128. {
  129.   /* destructor code */
  130. }
  131.  
  132. /* void getCertificatePrincipal (in string aEntryName, out nsIPrincipal aPrincipal); */
  133. NS_IMETHODIMP nsJAR::GetCertificatePrincipal(const char *aEntryName, nsIPrincipal **aPrincipal)
  134. {
  135.     return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137.  
  138. /* readonly attribute PRUint32 manifestEntriesCount; */
  139. NS_IMETHODIMP nsJAR::GetManifestEntriesCount(PRUint32 *aManifestEntriesCount)
  140. {
  141.     return NS_ERROR_NOT_IMPLEMENTED;
  142. }
  143.  
  144. /* End of implementation class template. */
  145. #endif
  146.  
  147.  
  148. #endif /* __gen_nsIJAR_h__ */
  149.